<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品列表">
</@frame.head>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/search_table.css" />
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span>订单管理 <span class="c-gray en">&gt;</span> 订单查询 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
<form method="post" name="query_order_form"  id="query_order" action="${contextPath}/order/query_admin_order_list" >
   <input type="hidden" name="page" value="${pagination.pageNo}"  id="page" />                          
    <div class="text-c">
        <table class="table search_table">
           <tr>  
           <td>订单编号：</td>
           <td>
           <input type="text" class="input-text  radius" placeholder="订单编号" id="orderNo" name="orderNo" value="${(orderQo.orderNo?c)!}" >
           </td>
           <td>会员卡号：</td>
           <td>
           	    <input type="text" class="input-text  radius" placeholder="会员卡号" id="memberNo" name="memberNo" value="${orderQo.memberNo}" >
           </td>
           <td>商品名称：</td>
           <td>
           	    <input type="text" class="input-text  radius" placeholder="商品名称" id="prodName" name="prodName" value="${orderQo.prodName}" >
           </td>
          </tr>
        <tr>
            <td>下单时间：</td>
            <td style="padding: 0px;">
              <table style="padding: 0px;margin: 0px;width: 100%;" cellspacing="0" cellpadding="0">
                <tr>
                  <td style="width: 48%;">
                  <input onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'endDate\')||\'%y-%M-%d\'}',readOnly: true })" 
          			id="startDate" name="startTime" value="<#if orderQo.startTime?? >${orderQo.startTime?date}</#if>" 
           			class="input-text Wdate" readonly="" type="text">
                  </td>
                  <td style="width: 4%;">至</td>
                  <td style="width: 48%;">
                  <input onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'startDate\')}',maxDate:'%y-%M-%d',readOnly: true })"
               			id="endDate"   name="endTime" value="<#if orderQo.endTime?? >${orderQo.endTime?date}</#if>" 
               			class="input-text Wdate" type="text"></td>
                </tr>
              </table>
           </td>
           <td>收货人：</td>
           <td>
           	    <input type="text" class="input-text  radius" placeholder="收货人" id="recName" name="recName" value="${orderQo.recName}" >
           </td>
           <td>订单状态：</td>
           <td>
            	<span class="select-box radius">
           	    <select class="select" name="state" id="state" >
			    <option value="" >全部</option>
			    <option <#if orderQo.state==1 > selected="selected" </#if> value="1" >未支付</option>
			    <option <#if orderQo.state==2 > selected="selected" </#if> value="2" >已支付</option>
			    <option <#if orderQo.state==3 > selected="selected" </#if> value="3" >信息不正确</option>
			    <option <#if orderQo.state==4 > selected="selected" </#if> value="4" >挂起</option>
			    <option <#if orderQo.state==5 > selected="selected" </#if> value="5" >发货</option>
			    <option <#if orderQo.state==6 > selected="selected" </#if> value="6" >已发货</option>
			    <option <#if orderQo.state==7 > selected="selected" </#if> value="7" >订单已取消</option>
			    <option <#if orderQo.state==8 > selected="selected" </#if> value="8" >已签收</option>
			    <option <#if orderQo.state==9 > selected="selected" </#if> value="9" >已退款</option>
			    <option <#if orderQo.state==10 > selected="selected" </#if> value="10" >已拒签</option>
			    <option <#if orderQo.state==11 > selected="selected" </#if> value="11" >支付处理中</option>
			    <option <#if orderQo.state==12 > selected="selected" </#if> value="12" >支付失败</option>
			    <option <#if orderQo.state==13 > selected="selected" </#if> value="13" >发放成功</option>
			    <option  <#if orderQo.state==14 > selected="selected" </#if> value="14" >发放中</option>
			    </span>      
               </select>
           </td>
         </tr>
         <tr>
         	<td>
         		订单来源：</td>
           <td>
              <span class="select-box radius">
         		<select class="select" widht="140px" name="orderSource"  id="orderSource">
			    <option value="">全部</option>
			    <option  <#if orderQo.orderSource=="M" > selected="selected" </#if>  value="M">移动端</option>
			    <option <#if orderQo.orderSource=="P" > selected="selected" </#if>  value="P">PC端</option>
			    <option <#if orderQo.orderSource=="Q" > selected="selected" </#if>  value="Q">二维码</option>
               </select>
               </span>
         	</td>
         	
         <td>
         		用户类别：</td>
           <td>
              <span class="select-box radius">
         		<select class="select" widht="140px" name="memberType" id="memberType" >
			   	<option value="">全部</option>
			    <option <#if orderQo.memberType==1 > selected="selected" </#if> value="1">个人卡</option>
			    <option <#if orderQo.memberType==2 > selected="selected" </#if> value="2">公司卡</option>
               </select>
               </span>
         	</td>
         <td>商品类型：</td>
           <td>					
              <span class="select-box radius">						
			<select class="select" name="prodType" id="prodType">
		    <option value="">全部</option>
		    <option <#if orderQo.prodType==1 > selected="selected" </#if>  value="1">实物商品</option>
		    <option <#if orderQo.prodType==2 > selected="selected" </#if>  value="2">虚拟商品</option>
		    <option <#if orderQo.prodType==3 > selected="selected" </#if>  value="3">机票优惠券</option>
		    <option <#if orderQo.prodType==6 > selected="selected" </#if>  value="6">公益产品</option>
			</select>
			</span>
         </td>
         </tr>
         <tr>
                    <td>手机号：</td>
           <td>
           	    <input type="text"  onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onafterpaste="this.value=this.value.replace(/[^0-9]/g,'')" maxlength="11" class="input-text  radius" placeholder="接收电子码手机号" id="xn_phone" name="xn_phone" value="${orderQo.xn_phone}" >
           </td>
           <td></td>
         <td colspan="5" style="text-align:left;" >
           <input class="btn btn-success radius" type="button"  onclick="search();"  value="搜索" />
           <input class="btn btn-success radius" type="button"  onclick="toIsEmpty();" value="重置" />
           <input class="btn btn-success radius" type="button"  onclick="refresh();"   value="刷新" />
           <input class="btn btn-success radius" type="button"  onclick="slimport('${contextPath}');"   value="导出" />
         </td>
         </tr>
      </table>
    </div>
</form>

    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
  
    
    <span class="r">共有数据：<strong> ${pagination.totalCount} </strong> 条</span> </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        
        <tr   class="text-c">
            <!-- <th width="45px">
            <input  type="checkbox" id="selectAll" disabled="disabled" onclick="checkAll()"/>
            </th> -->
            <th width="120">订单编号</th>
            <th width="170">商品名称</th>
           
            <th width="100">商品类型</th>
            <th width="130">收货人/手机号</th>
            <th width="120" > 下单时间</th>
            <th width="50" > 用户类别</th>
            <th width="50" > 状态</th>
            <th width="50" > 来源</th>
              <th width="50" >操作</th>
    
        </tr>
        </thead>
        <tbody>
       <#if pagination.list?? && (pagination.list?size &gt; 0) >
        <#list pagination.list as orders> 
        	 <tr>
        	   	<td >${orders.id?c}  </td>
        	   	<td > 
        	   	<#if fieldMap??>
        	   	   <#list fieldMap?keys as key> 
			  		 <#if orders.id?c==key >
			  		    <#list fieldMap[key]  as ps>  
			  		    	${ ps.field_two}&nbsp;
                      	</#list>
                 	</#if>  	
			     </#list>
        	   	</#if>
        	   	    
       	   		</td>
        	   	<td >  
        	    	<#if orders.orderType==1 >实物商品 
                  	<#elseif orders.orderType==2  >  虚拟商品
                    <#elseif orders.orderType==3  >  机票优惠券
                    <#elseif orders.orderType==6  >  公益产品
                 	</#if>  
        	   </td>
      			<td><#if orders.xn_phone==null> ${orders.receiveInfo.recName }
                  	<#else> ${orders.xn_phone}
                 	</#if>  </td>
 				<td>   ${orders.orderTime?datetime }  </td>
 				
 				 <td>  	<#if orders.memberType==2> 公司卡 
 				 		<#else>个人卡
 				 		</#if> 
 				 </td>
                
	 			<td>
					<#if orders.state==1 >未支付
					<#elseif orders.state==2  > 已支付
			 		<#elseif orders.state==3  > 信息不正确
	               	<#elseif orders.state==4  > 挂起
	                <#elseif orders.state==5  >	发货
             	    <#elseif orders.state==6  > 已发货
    		        <#elseif orders.state==7  > 订单已取消
                   	<#elseif orders.state==8  > 已签收
                    <#elseif orders.state==9  > 已退款
                    <#elseif orders.state==10  >已拒签
                    <#elseif orders.state==11  > 支付处理中
					<#elseif orders.state==12  > 支付失败
                    <#elseif orders.state==13  > 发放成功
                    <#elseif orders.state==14  > 发放中
                 	</#if>  
	 				
	 			</td>
	 			<td>
	 			<#if orders.orderSource=="M">移动端
	 			<#elseif orders.orderSource=="P">PC端
 			 	<#else> 
 			 	 ${orders.orderSource }
 			 	</#if>
	 			</td>
 			 	<td>
 			 	 <a href="javascript:searchOrderDatil('${orders.id}')"  ><font color="red">查看</font></a>
 			 	<#if orders.orderType==1> 
 			  		<#if orders.state==7 ><a href="javascript:void()" onclick="javascript:checkOrderState('${orders.orderType}','${orders.id?c}')"><font color="red">校验</font></a> </#if>
 			 	 </#if>
 			 	  	<#if orders.orderType==2> 
 			  		<#if orders.state==7 ||orders.state==2 ><a href="javascript:void()" onclick="javascript:checkOrderState('${orders.orderType}','${orders.id?c}')"><font color="red">校验</font></a> </#if>
 			 	 </#if>
 			 	</td>
        	 </tr>
      </#list></#if>
     </tbody>
    </table>
    <div id="biuuu_city" style="padding-top: 10px;float: right"></div>
</div>
<@frame.end "default">
</@frame.end>

<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/order/search_order_list.js"></script>
<script type="text/javascript">
var path="${contextPath}";
laypage({
    cont: 'biuuu_city',//容器。值支持id名、原生dom对象，jquery对象。
    pages: ${pagination.totalPage},//通过后台拿到的总页数
    curr:  ${pagination.pageNo} || 1, //当前页
    skip: true, //是否开启跳页
	first: 1, //将首页显示为数字1,。若不显示，设置false即可
	last: ${pagination.totalPage}, //将尾页显示为总页数。若不显示，设置false即可
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
          $(page).val(obj.curr);//获取点击的页码
          $(query_order_form).submit();
        }
    }
})  
</script>
</body>

</html>
 
